package cn.buk.api.szkj.dto.eterm.request;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.ArrayList;
import java.util.List;

/**
 * 创建PNR的请求参数
 * @author yfdai
 */
public class PnrCreateRequest {

  @JsonProperty(value = "baseInfo")
  private CreatePnrBaseInfo baseInfo = new CreatePnrBaseInfo();

  @JsonProperty(value = "passenger")
  private List<CreatePnrPassenger> passengers;

  @JsonProperty(value = "flightSegment")
  private List<CreatePnrFlight> flights;

  @JsonProperty(value = "ctct")
  private List<CreatePnrPhone> phones;

  public CreatePnrBaseInfo getBaseInfo() {
    return baseInfo;
  }

  public void setBaseInfo(CreatePnrBaseInfo baseInfo) {
    this.baseInfo = baseInfo;
  }

  public List<CreatePnrPassenger> getPassengers() {
    if (passengers == null) {
      passengers = new ArrayList<>();
    }
    return passengers;
  }

  public void setPassengers(List<CreatePnrPassenger> passengers) {

    this.passengers = passengers;
  }

  public List<CreatePnrFlight> getFlights() {
    if (flights == null) {
      flights = new ArrayList<>();
    }
    return flights;
  }

  public void setFlights(List<CreatePnrFlight> flights) {
    this.flights = flights;
  }

  public List<CreatePnrPhone> getPhones() {
    if (phones == null) {
      phones = new ArrayList<>();
    }
    return phones;
  }

  public void setPhones(List<CreatePnrPhone> phones) {
    this.phones = phones;
  }
}
